package com.mxpio.erp.common.technology.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_TECHNOLOGY_SHIFT_INFO")
@Schema(description="班次信息表")//暂不启用
public class WorkShiftInfo extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "SHIFT_CODE_", updatable = false)
	@Schema(description = "班次编号")
	private String shiftCode;

	@Schema(description = "班次名称")
	@Column(name = "SHIFT_NAME_" )
	private String shiftName;
	/**班次类型*/
	@Dict(dicCode = "ERP_TECH_WORK_SHIFT_TYPE")
	@Schema(description = "班次类型")
	@Column(name = "SHIFT_TYPE_" )
	private String shiftType;

	/**是否启用*/
	@Column(name = "SHIFT_STEP_")
	@Schema(description = "是否跨日")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String shiftStep;

	@Column(name = "SHIFT_START_")
	@Schema(description = "开始时间")
	@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
	private Date shiftStart;

	@Column(name = "SHIFT_END_")
	@Schema(description = "结束时间")
	@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
	private Date shiftEnd;

	/**备用字段1*/
	@Schema(description = "说明")
	@Column(name = "REMARK_")
	private String remark;
}
